import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
Rectangle {
    width: 360;
    height: 300;

    TableView{
        id:tabView;
        anchors.fill: parent;

        TableViewColumn{
            role: "name";
            title: "Name";
            width: tabView.width/3;
            //elideMode: Text.ElideRight;
        }

        TableViewColumn{
            role: "cost";
            title: "Cost";
            width: tabView.width/3;
        }

        TableViewColumn{
            role: "manufacturer";
            title: "Manufacturer";
            width: tabView.width/3;
        }

        model: ListModel{
            id:lstModel;

            ListElement{
                name:"iPhone4S";
                cost:"4000";
                manufacturer:"Apple";
            }

            ListElement{
                name:"iPhone5S";
                cost:"5000";
                manufacturer:"Apple";
            }

            ListElement{
                name:"P8";
                cost:"2600";
                manufacturer:"HuaWei";
            }

            ListElement{
                name:"Mi 2S";
                cost:"1800";
                manufacturer:"XiaoMi";
            }
        }

        focus:true;
    }
}

